home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / complib / fft3d.z / fft3d
Encoding:
Text File  |  1998-10-30  |  7.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ccccfffffffftttt3333dddd,,,,zzzzfffffffftttt3333dddd((((3333FFFF))))                                            ccccfffffffftttt3333dddd,,,,zzzzfffffffftttt3333dddd((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ccccfffffffftttt3333dddd,,,, zzzzfffffffftttt3333dddd ---- 3D Complex-to-Complex Fast Fourier Transform.
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
  12.      _F_o_r_t_r_a_n :
  13.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccfffffffftttt3333dddd(((( ssssiiiiggggnnnn,,,, nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, aaaarrrrrrrraaaayyyy,,,, llllaaaa1111,,,, llllaaaa2222,,,, ccccooooeeeeffff ))))
  14.           iiiinnnntttteeeeggggeeeerrrr  ssssiiiiggggnnnn,,,, nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
  15.           ccccoooommmmpppplllleeeexxxx  aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
  16.           ccccoooommmmpppplllleeeexxxx ccccooooeeeeffff((((((((nnnn1111++++11115555))))++++((((nnnn2222++++11115555))))++++((((nnnn3333++++11115555))))))))
  17.  
  18.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzfffffffftttt3333dddd(((( ssssiiiiggggnnnn,,,, nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, aaaarrrrrrrraaaayyyy,,,, llllaaaa1111,,,, llllaaaa2222,,,, ccccooooeeeeffff ))))
  19.           iiiinnnntttteeeeggggeeeerrrr  ssssiiiiggggnnnn,,,, nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
  20.           ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
  21.           ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx ccccooooeeeeffff((((((((nnnn1111++++11115555))))++++((((nnnn2222++++11115555))))++++((((nnnn3333++++11115555))))))))
  22.  
  23.  
  24.      _C :
  25.      ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
  26.      iiiinnnntttt ccccfffffffftttt3333dddd((((iiiinnnntttt ssssiiiiggggnnnn,,,,iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,
  27.                     iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222,,,, ccccoooommmmpppplllleeeexxxx ****ccccooooeeeeffff))));;;;
  28.      iiiinnnntttt zzzzfffffffftttt3333dddd((((iiiinnnntttt ssssiiiiggggnnnn,,,,iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,
  29.                     iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222,,,, zzzzoooommmmpppplllleeeexxxx ****ccccooooeeeeffff))));;;;
  30.  
  31.  
  32. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  33.      ccccfffffffftttt3333dddd and zzzzfffffffftttt3333dddd compute in place the complex Fourier transform of
  34.      complex 3D sequence of size N1xN2xN3.  The value F{j1,j2,j3} of the
  35.      transform of the 3D sequence f{i1,i2,i3} is equal to:
  36.        F{j1,j2,j3} = Sum(W1^(i1*j1)*W2^(i2*j2)*W3^(i3*j3*f{i1,i2,i3} ),
  37.                      for i[123] =0,...,(N[123]-1)
  38.                  W[123] = exp( (Sign*2*sqrt(-1)*PI) / N[123] )
  39.  
  40.  
  41. SSSSttttoooorrrraaaaggggeeee
  42.      It is assumed that the (N1 x N2 x N3) 3D sequence is stored along
  43.      dimension N1.  So the index {i+1,j,l} has an offset of 1 element with
  44.      respect to {i,j,l}, and {i,j+1,k} an offset of _l_a_1 elements with respect
  45.      to {i,j,k}, and {i,j,k+1} an offset of (_l_a_1 * _l_a_2) elements with respect
  46.      to {i,j,k}.
  47.  
  48.  
  49. AAAAllllggggoooorrrriiiitttthhhhmmmm
  50.      The complex-to-complex 3D Fourier transform is computed with a row-column
  51.      approach.
  52.       - First, N3 2D FFTs complex-to-complex of size N1xN2 are evaluated,
  53.       - then, N1*N2 FFTs complex-to-complex of size N3 are performed,
  54.      stride=la1*la2, and leading_dimension=1.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccfffffffftttt3333dddd,,,,zzzzfffffffftttt3333dddd((((3333FFFF))))                                            ccccfffffffftttt3333dddd,,,,zzzzfffffffftttt3333dddd((((3333FFFF))))
  71.  
  72.  
  73.  
  74. PARAMETERS
  75.      SSSSIIIIGGGGNNNN ---- Integer specifying which sign to be used for the expression of W
  76.      (see above) - must be either +1 or -1.
  77.      Unchanged on exit.
  78.  
  79.      NNNN1111 Integer, the first dimension size of the 3D sequence.  Unchanged on
  80.      exit.
  81.  
  82.      NNNN2222 Integer, the second dimension size of the 3D sequence.  Unchanged on
  83.      exit.
  84.  
  85.      NNNN3333 Integer, the third dimension size of the 3D sequence.  Unchanged on
  86.      exit.
  87.  
  88.      AAAARRRRRRRRAAAAYYYY Array containing the samples of the 3D sequence to be transformed.
  89.      On input, the element {i,j,k} of the sequence is stored as A(i,j,k) in
  90.      _F_o_r_t_r_a_n , and A[i+j*la1+k*la1*la2] in _C. On exit, the array is
  91.      overwritten.
  92.  
  93.      LLLLAAAA1111 Integer, first leading dimension: increment between the samples of
  94.      two consecutive 1D sub-sequences (e.g between {i,j+1,k} and {i,j,k} ).
  95.      Unchanged on exit.
  96.  
  97.      LLLLAAAA2222 Integer, second leading dimension: number of the 1D sub-sequence
  98.      between two consecutive 2D sub-sequences (e.g between {i,j,k+1} and
  99.      {i,j,k}).  Unchanged on exit.
  100.  
  101.      CCCCOOOOEEEEFFFFFFFF ---- Array of at least ( (N+15)+(N2+15)+(N3+15) ) elements.  On entry
  102.      it contains the Sines/Cosines and factorization of N. COEFF needs to be
  103.      initialized with a call to cfft3di or zfft3di. Unchanged on exit.
  104.  
  105.  
  106. EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
  107.      3D FFT computed on a complex sequence of size 100x64x125.
  108.      _F_o_r_t_r_a_n
  109.           complex array(0:100-1,0:64-1,0:125-1)
  110.           complex coeff(100+15 + 64+15 + 125+15)
  111.           call cfft3di( 100, 64, 125, coeff)
  112.           call cfft3d( -1, 100, 64, 125, array, 100, 64, coeff)
  113.  
  114.      _C
  115.           #include <fft.h>
  116.           complex array[100*64*125], *coeff;
  117.           coeff = cfft3di( 100, 64, 125, NULL);
  118.           cfft3d( -1, 100, 64, 125, array, 100, 64, coeff);
  119.  
  120. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  121.      fft, cfft3di, zfft3di
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.